#include <stdio.h>
#include <stdlib.h>
#include <string.h>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char *argv[]) 
{
	char arr[20]={0};
	printf("请输入“1”后回车（Enter），否则计算机将在60秒后关机\n");
	system("shutdown -s -t 60");
again:
	scanf("%s",arr);
	if (strcmp(arr,"1")==0)
	  {
	  system("shutdown -a");
	  printf("你成功阻止了这次关机。\n");
	  }
	else
	  printf("输入错误，请重新输入: ");
	  goto again;
	return 0;
}
